function bar() {
  console.log(myName);
}
function foo() {
  var myName = '小君'
  bar()
}
var myName = '冯总'
foo() 

//词法作用域